home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_riv_ambsneakpath.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  90 lines

  1. # Jones 3D Cog Script
  2. #
  3. # RIV_AmbSneakPath.cog
  4. #
  5. # Plays random ambient sounds at random positions and drops
  6. # snow at all the positions all the time.
  7. #
  8. # [TRM]
  9. #
  10. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  11. # ========================================================================================
  12.  
  13. symbols
  14.  
  15.     message        entered
  16.     message     pulse
  17.  
  18.     thing        soundPos0        nolink
  19.     thing        soundPos1        nolink
  20.     thing        soundPos2        nolink
  21.     
  22.     sector      start_Amb1      linkID=1
  23.     sector      start_Amb2      linkID=1
  24.     
  25.     sector      stop_Amb1       linkID=0
  26.     sector      stop_Amb2       linkID=0
  27.  
  28.     sound        ambient0=shw_amb1.wav   local
  29.     sound        ambient1=shw_amb2.wav   local
  30.     sound        ambient2=shw_amb3.wav   local
  31.     sound        ambient3=shw_amb4.wav   local
  32.     sound        ambient4=shw_amb5.wav   local
  33.     sound        ambient5=shw_amb6.wav   local
  34.     sound        ambient6=shw_amb7.wav   local
  35.     
  36.     template    tpl_Snow=skitosnow      local
  37.     
  38.     int         playing=0               local
  39.     
  40.     int         randNum                 local
  41.     sound       snd_Wolf=fol_wolf_talk.wav      local
  42.     
  43. end
  44.  
  45. # ========================================================================================
  46.  
  47. code
  48.  
  49. entered:
  50.  
  51.     if((GetSenderID() == 1) && (playing == 0))
  52.     {
  53.         playing = 1;
  54.         setpulse(2.0);
  55.     }
  56.     
  57.     if(GetSenderID() == 0)
  58.     {
  59.         playing = 0;
  60.         SetPulse(0.0);
  61.     }
  62.     
  63.     return;
  64.  
  65. # ========================================================================================
  66.  
  67. pulse:
  68.  
  69.     PlaySoundThing(ambient0[RandBetween(0, 6)], soundPos0[RandBetween(0, 2)], 1.0, 15, 30, 0);
  70.     
  71.     randNum = RandBetween(1, 10);
  72.     
  73.     if(randNum == 5)
  74.     {
  75.         PlaySoundThing(snd_Wolf, soundPos0[RandBetween(0, 7)], 0.5, 15, 30, 0);
  76.     }
  77.     
  78.     if(GetPerformanceLevel() >= 2)
  79.     {
  80.         CreateThing(tpl_Snow, soundPos0);        
  81.         CreateThing(tpl_Snow, soundPos1);        
  82.         CreateThing(tpl_Snow, soundPos2);
  83.     }        
  84.     
  85.     return;
  86.  
  87. # ========================================================================================
  88.  
  89. end
  90.